# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-ipapi
_pkgname=ipapi
pkgver=1.0.4
pkgrel=7
pkgdesc='Python bindings for ipapi.'
arch=('any')
url='https://pypi.org/project/ipapi/#files'
license=('MIT')
depends=('python' 'python-requests')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('065072cc2f34d0a9818f7729fb5c518025e2c03fef8eb6ea18941b2bdb516e32c74149f16e1daaad13e8f3be73ca06107ad63dbc4c39b235fcad2a29d2304a0e')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {

  cd "$_pkgname-$pkgver"

  python setup.py install --prefix=/usr --root="$pkgdir" -O1 --skip-build
}

